<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>register</title>
</head>
<body>
	<h1>Create an account</h1>

	<form action="/myList/connection" method="post" >
		<input type="hidden"  name="action" value="register" />
		<table>
			<tr>
				<td>First Name</td>
				<td><input type="text" name="firstName"></td>
			</tr>
			<tr>
				<td>Last Name</td>
				<td><input type="text" name="lastName"></td>
			</tr>
			<tr>
				<td>Login</td>
				<td><input type="text" name="login"></td>
			</tr>
			<tr>
				<td>pass</td>
				<td><input type="text" name="pass1"></td>
			</tr>
			<tr>
				<td>pass</td>
				<td><input type="text" name="pass2"></td>
			</tr>

			<%
			out.println(request.getParameter("error"));
			out.println(("passDifferent"));
				if ("loginExists".equals(request.getParameter("error"))) {
					out.println("<span style=\"color:red\"> Error : The login is not available</span>");
				} else if ("passDifferent".equals(request.getParameter("error"))) {
					out.println("<span style=\"color:red\"> Error : The two passwords are differents</span>");
				}
				else
				{
					out.println("pouet");
				}
			%>
		</table>
		<input type="submit" value="Register !"><a href="/myList/jsp/index.jsp"><input type="button" value="Cancel" /></a>
	</form>
</body>
</html>